<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>IDA SDK: idcfuncs_t Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">IDA SDK
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="files.html"><span>Header&#160;Files</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structidcfuncs__t-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">idcfuncs_t Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Describes an array of IDC functions. </p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a1a168ecf7cb2fbe858ae64c26e4a9999"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1a168ecf7cb2fbe858ae64c26e4a9999"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structidcfuncs__t.html#a1a168ecf7cb2fbe858ae64c26e4a9999">qnty</a></td></tr>
<tr class="memdesc:a1a168ecf7cb2fbe858ae64c26e4a9999"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of functions. <br /></td></tr>
<tr class="separator:a1a168ecf7cb2fbe858ae64c26e4a9999"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c9e1152c1cc8bb5c6df0540fb8429c2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8c9e1152c1cc8bb5c6df0540fb8429c2"></a>
<a class="el" href="structext__idcfunc__t.html">ext_idcfunc_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structidcfuncs__t.html#a8c9e1152c1cc8bb5c6df0540fb8429c2">funcs</a></td></tr>
<tr class="memdesc:a8c9e1152c1cc8bb5c6df0540fb8429c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function table. <br /></td></tr>
<tr class="separator:a8c9e1152c1cc8bb5c6df0540fb8429c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">IDC Engine</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>IDC engine requires the following functions (all of them may be NULL) </p>
</div></td></tr>
<tr class="memitem:ab95ccd972f0358cf2d52ad396a215d65"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab95ccd972f0358cf2d52ad396a215d65"></a>
<a class="el" href="pro_8h.html#a9ad6b2dc3cbff040775e79656fe8e1a3">error_t</a>(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structidcfuncs__t.html#ab95ccd972f0358cf2d52ad396a215d65">startup</a> )(void)</td></tr>
<tr class="memdesc:ab95ccd972f0358cf2d52ad396a215d65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start IDC engine. Called before executing any IDC code. <br /></td></tr>
<tr class="separator:ab95ccd972f0358cf2d52ad396a215d65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a0ffe14f4b46d67abfc56645f143875"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#a9ad6b2dc3cbff040775e79656fe8e1a3">error_t</a>(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structidcfuncs__t.html#a4a0ffe14f4b46d67abfc56645f143875">shutdown</a> )(void)</td></tr>
<tr class="memdesc:a4a0ffe14f4b46d67abfc56645f143875"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop IDC engine.  <a href="#a4a0ffe14f4b46d67abfc56645f143875">More...</a><br /></td></tr>
<tr class="separator:a4a0ffe14f4b46d67abfc56645f143875"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86402c79650f4e3ff74e5ac9dfa1e555"><td class="memItemLeft" align="right" valign="top">void(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structidcfuncs__t.html#a86402c79650f4e3ff74e5ac9dfa1e555">init_idc</a> )(void)</td></tr>
<tr class="memdesc:a86402c79650f4e3ff74e5ac9dfa1e555"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize IDC engine.  <a href="#a86402c79650f4e3ff74e5ac9dfa1e555">More...</a><br /></td></tr>
<tr class="separator:a86402c79650f4e3ff74e5ac9dfa1e555"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b65ad6a49850c0f462c8543dbe892fd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7b65ad6a49850c0f462c8543dbe892fd"></a>
void(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structidcfuncs__t.html#a7b65ad6a49850c0f462c8543dbe892fd">term_idc</a> )(void)</td></tr>
<tr class="memdesc:a7b65ad6a49850c0f462c8543dbe892fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Terminate IDC engine. Called once at the very end of work. <br /></td></tr>
<tr class="separator:a7b65ad6a49850c0f462c8543dbe892fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1bcc06def8ff09001aee0c5687f3084b"><td class="memItemLeft" align="right" valign="top">bool(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structidcfuncs__t.html#a1bcc06def8ff09001aee0c5687f3084b">is_database_open</a> )(void)</td></tr>
<tr class="memdesc:a1bcc06def8ff09001aee0c5687f3084b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the database open? (used for <a class="el" href="group___e_x_t_f_u_n__.html#ga10db1b89a32d67a13cab2ed10ef7c4f4" title="requires open database. ">EXTFUN_BASE</a> functions).  <a href="#a1bcc06def8ff09001aee0c5687f3084b">More...</a><br /></td></tr>
<tr class="separator:a1bcc06def8ff09001aee0c5687f3084b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35b184c7411f9180f6bdae1bc3d86294"><td class="memItemLeft" align="right" valign="top">size_t(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structidcfuncs__t.html#a35b184c7411f9180f6bdae1bc3d86294">ea2str</a> )(char *buf, size_t bufsize, <a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a> ea)</td></tr>
<tr class="memdesc:a35b184c7411f9180f6bdae1bc3d86294"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an address to a string.  <a href="#a35b184c7411f9180f6bdae1bc3d86294">More...</a><br /></td></tr>
<tr class="separator:a35b184c7411f9180f6bdae1bc3d86294"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58c33943de9c58b9c59e36fa54551385"><td class="memItemLeft" align="right" valign="top">bool(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structidcfuncs__t.html#a58c33943de9c58b9c59e36fa54551385">undeclared_variable_ok</a> )(const char *name)</td></tr>
<tr class="memdesc:a58c33943de9c58b9c59e36fa54551385"><td class="mdescLeft">&#160;</td><td class="mdescRight">Should a variable name be accepted without declaration?.  <a href="#a58c33943de9c58b9c59e36fa54551385">More...</a><br /></td></tr>
<tr class="separator:a58c33943de9c58b9c59e36fa54551385"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Indexes</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>Indexes into the 'f' array.</p>
<p>non-positive values mean that the function does not exist </p>
</div></td></tr>
<tr class="memitem:ad3c77370d4e24f2aa1492d16be8bc9a2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structidcfuncs__t.html#ad3c77370d4e24f2aa1492d16be8bc9a2">get_unkvar</a></td></tr>
<tr class="memdesc:ad3c77370d4e24f2aa1492d16be8bc9a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve value of an undeclared variable.  <a href="#ad3c77370d4e24f2aa1492d16be8bc9a2">More...</a><br /></td></tr>
<tr class="separator:ad3c77370d4e24f2aa1492d16be8bc9a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc8d4d9810b2cac83456f29da56f1a88"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structidcfuncs__t.html#abc8d4d9810b2cac83456f29da56f1a88">set_unkvar</a></td></tr>
<tr class="memdesc:abc8d4d9810b2cac83456f29da56f1a88"><td class="mdescLeft">&#160;</td><td class="mdescRight">Store a value to an undeclared variable.  <a href="#abc8d4d9810b2cac83456f29da56f1a88">More...</a><br /></td></tr>
<tr class="separator:abc8d4d9810b2cac83456f29da56f1a88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac144b55099e615363a12eb517c0611fa"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structidcfuncs__t.html#ac144b55099e615363a12eb517c0611fa">exec_resolved_func</a></td></tr>
<tr class="memdesc:ac144b55099e615363a12eb517c0611fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Execute resolved function.  <a href="#ac144b55099e615363a12eb517c0611fa">More...</a><br /></td></tr>
<tr class="separator:ac144b55099e615363a12eb517c0611fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a353eae2361f5afab5f048a346b87442b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structidcfuncs__t.html#a353eae2361f5afab5f048a346b87442b">calc_sizeof</a></td></tr>
<tr class="memdesc:a353eae2361f5afab5f048a346b87442b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate sizeof(type).  <a href="#a353eae2361f5afab5f048a346b87442b">More...</a><br /></td></tr>
<tr class="separator:a353eae2361f5afab5f048a346b87442b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4269099de87fcbb621e686d107906d7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structidcfuncs__t.html#ad4269099de87fcbb621e686d107906d7">get_field_ea</a></td></tr>
<tr class="memdesc:ad4269099de87fcbb621e686d107906d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get address of the specified field using the type information from the idb.  <a href="#ad4269099de87fcbb621e686d107906d7">More...</a><br /></td></tr>
<tr class="separator:ad4269099de87fcbb621e686d107906d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a4a0ffe14f4b46d67abfc56645f143875"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#a9ad6b2dc3cbff040775e79656fe8e1a3">error_t</a>(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> * idcfuncs_t::shutdown) (void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stop IDC engine. </p>
<p>Called when all IDC engines finish. In other words, nested IDC engines do not call startup/shutdown. </p>

</div>
</div>
<a class="anchor" id="a86402c79650f4e3ff74e5ac9dfa1e555"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> * idcfuncs_t::init_idc) (void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize IDC engine. </p>
<p>Called once at the very beginning of work. This callback may create additional IDC classes, methods, etc. </p>

</div>
</div>
<a class="anchor" id="a1bcc06def8ff09001aee0c5687f3084b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> * idcfuncs_t::is_database_open) (void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Is the database open? (used for <a class="el" href="group___e_x_t_f_u_n__.html#ga10db1b89a32d67a13cab2ed10ef7c4f4" title="requires open database. ">EXTFUN_BASE</a> functions). </p>
<p>if this pointer is NULL, <a class="el" href="group___e_x_t_f_u_n__.html#ga10db1b89a32d67a13cab2ed10ef7c4f4" title="requires open database. ">EXTFUN_BASE</a> is not checked. </p>

</div>
</div>
<a class="anchor" id="a35b184c7411f9180f6bdae1bc3d86294"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> * idcfuncs_t::ea2str) (char *buf, size_t bufsize, <a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a> ea)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an address to a string. </p>
<p>if this pointer is NULL, 'a' will be used. </p>

</div>
</div>
<a class="anchor" id="a58c33943de9c58b9c59e36fa54551385"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool(<a class="el" href="pro_8h.html#a6505e7ff3b129d8b17258304886fd133">idaapi</a> * idcfuncs_t::undeclared_variable_ok) (const char *name)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Should a variable name be accepted without declaration?. </p>
<p>When the parser encounters an unrecognized variable, this callback is called. If it returns false, the parser generates the 'undefined variable' error else the parser generates code to call to a set or get function, depending on the current context. If this pointer is NULL, undeclared variables won't be supported. However, if 'resolver' object is provided to the parser, it will be used to resolve such names to constants at the compilation time. This callback is used by IDA to handle processor register names. </p>

</div>
</div>
<a class="anchor" id="ad3c77370d4e24f2aa1492d16be8bc9a2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int idcfuncs_t::get_unkvar</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieve value of an undeclared variable. </p>
<p>Expected prototype: get(<a class="el" href="group___v_t__.html#ga662cae113f2d445abd2f017c5c314cba" title="String (see qstr() and similar functions) ">VT_STR</a> varname) </p>

</div>
</div>
<a class="anchor" id="abc8d4d9810b2cac83456f29da56f1a88"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int idcfuncs_t::set_unkvar</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Store a value to an undeclared variable. </p>
<p>Expected prototype: set(<a class="el" href="group___v_t__.html#gadb82f81e6751e3bc2a5437b649d6f00c" title="Function with arbitrary number of arguments. ">VT_WILD</a> new_value, <a class="el" href="group___v_t__.html#ga662cae113f2d445abd2f017c5c314cba" title="String (see qstr() and similar functions) ">VT_STR</a> varname) </p>

</div>
</div>
<a class="anchor" id="ac144b55099e615363a12eb517c0611fa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int idcfuncs_t::exec_resolved_func</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Execute resolved function. </p>
<p>If 'resolver' was used to resolve an unknown name to a constant in a function call context, such a call will be redirected here. Expected prototype: exec_resolved_func(<a class="el" href="group___v_t__.html#ga9366c439f83b49166170067f8ee071fc" title="Integer (see idc_value_t::num) ">VT_LONG</a> func, <a class="el" href="group___v_t__.html#gadb82f81e6751e3bc2a5437b649d6f00c" title="Function with arbitrary number of arguments. ">VT_WILD</a> typeinfo, ...) This callback is used in IDA for Appcall. </p>

</div>
</div>
<a class="anchor" id="a353eae2361f5afab5f048a346b87442b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int idcfuncs_t::calc_sizeof</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculate sizeof(type). </p>
<p>This function is used by the interpreter to calculate sizeof() expressions. Please note that the 'type' argument is an IDC object of typeinfo class. Expected prototype: calc_sizeof(<a class="el" href="group___v_t__.html#gac29d7f7b5206c6d0c3d76e05ca32b97a" title="Object (see idc_value_t::obj) ">VT_OBJ</a> typeinfo) This callback requires support of the type system (available only in IDA kernel) It should not be used by standalone IDC interpreters. </p>

</div>
</div>
<a class="anchor" id="ad4269099de87fcbb621e686d107906d7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int idcfuncs_t::get_field_ea</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get address of the specified field using the type information from the idb. </p>
<p>This function is used to resolve expressions like 'mystr.field' where mystr does not represent an IDC object but just a plain number. The number is interpreted as an address in the current idb. This function retrieves type information at this address and tried to find the specified 'field'. It returns the address of the 'field' in the idb. This callback should not be used by standalone IDC interpreters. </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="expr_8hpp.html">expr.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
